viewport: Small cleanup
authorTimm Bäder <mail@baedert.org>
Sun, 27 Dec 2020 17:05:44 +0000 (18:05 +0100)
committerTimm Bäder <mail@baedert.org>
Sun, 3 Jan 2021 10:01:29 +0000 (11:01 +0100)
No need to check for visibility before calling gtk_widget_measure().

gtk/gtkviewport.c

index 42bf850864297ffe0c333b684472d632db68d741..0581a95e9dda4bc3440e597a26ca150eeba43adc 100644 (file)
@@ -71,7 +71,7 @@ struct _GtkViewport
 
   GtkAdjustment  *hadjustment;
   GtkAdjustment  *vadjustment;
+
   /* GtkScrollablePolicy needs to be checked when
    * driving the scrollable adjustment values */
   guint hscroll_policy : 1;
@@ -244,9 +244,7 @@ gtk_viewport_measure (GtkWidget      *widget,
 {
   GtkViewport *viewport = GTK_VIEWPORT (widget);
 
-  *minimum = *natural = 0;
-
-  if (viewport->child && gtk_widget_get_visible (viewport->child))
+  if (viewport->child)
     gtk_widget_measure (viewport->child,
                         orientation,
                         for_size,